

<!DOCTYPE html>
<html class="writer-html5" lang="zh-CN" >
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>&lt;no title&gt; &mdash; AIL-docs  文档</title>
  

  
  <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="_static/pygments.css" type="text/css" />

  
  
  
  

  
  <!--[if lt IE 9]>
    <script src="_static/js/html5shiv.min.js"></script>
  <![endif]-->
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
        <script src="_static/jquery.js"></script>
        <script src="_static/underscore.js"></script>
        <script src="_static/doctools.js"></script>
        <script src="_static/language_data.js"></script>
        <script src="_static/translations.js"></script>
    
    <script type="text/javascript" src="_static/js/theme.js"></script>

    
    <link rel="index" title="索引" href="genindex.html" />
    <link rel="search" title="搜索" href="search.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="index.html" class="icon icon-home" alt="Documentation Home"> AIL-docs
          

          
          </a>

          
            
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        
        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <p class="caption"><span class="caption-text">目录</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="whatsnew/index.html">版本介绍</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial/index.html">入门教程</a></li>
<li class="toctree-l1"><a class="reference internal" href="library/index.html">标准库参考</a></li>
<li class="toctree-l1"><a class="reference internal" href="reference/index.html">语言参考</a></li>
</ul>

            
          
        </div>
        
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">AIL-docs</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
        
      <li>&lt;no title&gt;</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="_sources/contents.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="index.html">AIL 文档</a><ul>
<li class="toctree-l2"><a class="reference internal" href="whatsnew/index.html">版本介绍</a><ul>
<li class="toctree-l3"><a class="reference internal" href="whatsnew/1_2.html">1.2</a><ul>
<li class="toctree-l4"><a class="reference internal" href="whatsnew/1_2.html#id1">主要更新</a><ul>
<li class="toctree-l5"><a class="reference internal" href="whatsnew/1_2.html#id2">语法更新</a></li>
<li class="toctree-l5"><a class="reference internal" href="whatsnew/1_2.html#id3">新的异常处理机制和栈回溯提示</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="whatsnew/1_2.html#id4">其他更新</a></li>
<li class="toctree-l4"><a class="reference internal" href="whatsnew/1_2.html#bug">Bug修复</a></li>
<li class="toctree-l4"><a class="reference internal" href="whatsnew/1_2.html#id5">优化</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="tutorial/index.html">入门教程</a><ul>
<li class="toctree-l3"><a class="reference internal" href="tutorial/setup.html">1. 搭建AIL运行环境</a><ul>
<li class="toctree-l4"><a class="reference internal" href="tutorial/setup.html#id1">1.1. 前期准备</a></li>
<li class="toctree-l4"><a class="reference internal" href="tutorial/setup.html#id2">1.2. 下载AIL</a></li>
<li class="toctree-l4"><a class="reference internal" href="tutorial/setup.html#id3">1.3. 安装AIL</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="tutorial/basic.html">2. 将AIL用于计算</a><ul>
<li class="toctree-l4"><a class="reference internal" href="tutorial/basic.html#id1">2.1. 数字</a></li>
<li class="toctree-l4"><a class="reference internal" href="tutorial/basic.html#id2">2.2. 运算</a></li>
<li class="toctree-l4"><a class="reference internal" href="tutorial/basic.html#id3">2.3. 字符串</a></li>
<li class="toctree-l4"><a class="reference internal" href="tutorial/basic.html#id4">2.4. 小结</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="tutorial/variable.html">3. 存储和使用变量</a><ul>
<li class="toctree-l4"><a class="reference internal" href="tutorial/variable.html#id2">3.1. 定义与赋值</a></li>
<li class="toctree-l4"><a class="reference internal" href="tutorial/variable.html#id3">3.2. 使用变量</a><ul>
<li class="toctree-l5"><a class="reference internal" href="tutorial/variable.html#id4">3.2.1. 使用变量进行运算</a></li>
<li class="toctree-l5"><a class="reference internal" href="tutorial/variable.html#id5">3.2.2. 无意义代码</a></li>
<li class="toctree-l5"><a class="reference internal" href="tutorial/variable.html#id6">3.2.3. 作为别称</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="tutorial/variable.html#id7">3.3. 小结</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="tutorial/program.html">4. 基本AIL程序</a><ul>
<li class="toctree-l4"><a class="reference internal" href="tutorial/program.html#id1">4.1. 编写AIL程序</a></li>
<li class="toctree-l4"><a class="reference internal" href="tutorial/program.html#id2">4.2. 运行AIL程序</a></li>
<li class="toctree-l4"><a class="reference internal" href="tutorial/program.html#id3">4.3. AIL程序结构</a></li>
<li class="toctree-l4"><a class="reference internal" href="tutorial/program.html#id4">4.4. AIL语句</a></li>
<li class="toctree-l4"><a class="reference internal" href="tutorial/program.html#id5">4.5. AIL语句块</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="tutorial/basicstmt.html">5. 基本输入输出语句</a><ul>
<li class="toctree-l4"><a class="reference internal" href="tutorial/basicstmt.html#print">5.1. print 语句</a></li>
<li class="toctree-l4"><a class="reference internal" href="tutorial/basicstmt.html#input">5.2. input 语句</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="tutorial/controlflow.html">6. 基本流程控制语句</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="library/index.html">标准库参考</a><ul>
<li class="toctree-l3"><a class="reference internal" href="library/builtins.html">builtins</a><ul>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#type-string">type string</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#type-integer">type integer</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#type-float">type float</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#type-array">type array</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#type-ccom-t">type CCOM_T</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#type-iobuffer-t">type iobuffer_t</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#type-longish">type longish</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#type-fast-number">type fast_number</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#type-struct-type">type struct_type</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#type-object">type object</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#type-any">type any</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#type-null">type null</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#type-bool">type bool</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#union-number">union number</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#var-null-null">var null: null</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#var-true-bool">var true: bool</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#var-false-bool">var false: bool</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#var-version-string">var __version__: string</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#var-main-version-integer">var __main_version__: integer</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#var-console-console">var console: console</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-abs-x-number-number">builtins.abs(x: number) -&gt; number</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-ng-x-number-number">builtins.ng(x: number) -&gt; number</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-int-input-prompt-string-integer">builtins.int_input(prompt: string) -&gt; integer</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-chr-x-integer-string">builtins.chr(x: integer) -&gt; string</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-ord-x-string-integer">builtins.ord(x: string) -&gt; integer</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-hex-x-integer-string">builtins.hex(x: integer) -&gt; string</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-new-type-struct-type-default-list-array-object">builtins.new(type: struct_type, default_list: array={}) -&gt; object</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-len-x-longish-integer">builtins.len(x: longish) -&gt; integer</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-equal-a-any-b-any-boolean">builtins.equal(a: any, b: any) -&gt; boolean</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-equal-type-a-any-b-any-boolean">builtins.equal_type(a: any, b: any) -&gt; boolean</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-array-size-integer-array">builtins.array(size: integer) -&gt; array</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-isinstance-obj-any-type-struct-type-boolean">builtins.isinstance(obj: any, type: struct_type) -&gt; boolean</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-str-x-any-string">builtins.str(x: any) -&gt; string</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-int-x-number-integer">builtins.int(x: number) -&gt; integer</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-repr-x-any-string">builtins.repr(x: any) -&gt; string</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-open-fp-string-mode-string-iobuffer-t">builtins.open(fp: string, mode: string) -&gt; iobuffer_t</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-addr-obj-any-integer">builtins.addr(obj: any) -&gt; integer</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-get-ccom-ccom-t">builtins._get_ccom() -&gt; CCOM_T</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-fnum-num-number-fast-number">builtins.fnum(num: number) -&gt; fast_number</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/builtins.html#builtins-type-obj-any-integer">builtins.type(obj: any) -&gt; integer</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="library/map.html">map</a><ul>
<li class="toctree-l4"><a class="reference internal" href="library/map.html#type-hash-map">type hash_map</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/map.html#hash-map-put-key-hashable-value">hash_map.put(key: hashable, value)</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/map.html#hash-map-get-key-hashable-default-null-object">hash_map.get(key: hashable, default=null) -&gt; object</a></li>
<li class="toctree-l4"><a class="reference internal" href="library/map.html#map-map-hash-map">map.map() -&gt; hash_map</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="reference/index.html">语言参考</a><ul>
<li class="toctree-l3"><a class="reference internal" href="reference/operators.html">1. 操作符</a></li>
<li class="toctree-l3"><a class="reference internal" href="reference/types.html">2. 基本类型</a><ul>
<li class="toctree-l4"><a class="reference internal" href="reference/types.html#id2">2.1. 数字</a><ul>
<li class="toctree-l5"><a class="reference internal" href="reference/types.html#id3">2.1.1. 精度与范围</a></li>
<li class="toctree-l5"><a class="reference internal" href="reference/types.html#id4">2.1.2. 表示方式</a><ul>
<li class="toctree-l6"><a class="reference internal" href="reference/types.html#id5">2.1.2.1. 直接表示</a></li>
<li class="toctree-l6"><a class="reference internal" href="reference/types.html#id6">2.1.2.2. 科学计数法</a></li>
</ul>
</li>
<li class="toctree-l5"><a class="reference internal" href="reference/types.html#id7">2.1.3. 其他进制</a><ul>
<li class="toctree-l6"><a class="reference internal" href="reference/types.html#id8">2.1.3.1. 2进制</a></li>
<li class="toctree-l6"><a class="reference internal" href="reference/types.html#id9">2.1.3.2. 8进制</a></li>
<li class="toctree-l6"><a class="reference internal" href="reference/types.html#id10">2.1.3.3. 16进制</a></li>
</ul>
</li>
<li class="toctree-l5"><a class="reference internal" href="reference/types.html#id11">2.1.4. 复数</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="reference/types.html#id12">2.2. 字符串</a><ul>
<li class="toctree-l5"><a class="reference internal" href="reference/types.html#id13">2.2.1. 单行字符串</a></li>
<li class="toctree-l5"><a class="reference internal" href="reference/types.html#id14">2.2.2. 多行字符串</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="reference/types.html#id15">2.3. 数组</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="reference/namespace.html">3. 名称空间</a><ul>
<li class="toctree-l4"><a class="reference internal" href="reference/namespace.html#id2">3.1. 类型</a></li>
<li class="toctree-l4"><a class="reference internal" href="reference/namespace.html#id3">3.2. 检索顺序</a></li>
<li class="toctree-l4"><a class="reference internal" href="reference/namespace.html#id4">3.3. 结构与从属关系</a></li>
<li class="toctree-l4"><a class="reference internal" href="reference/namespace.html#id5">3.4. 本地名称空间</a></li>
<li class="toctree-l4"><a class="reference internal" href="reference/namespace.html#id6">3.5. 全局名称空间</a></li>
<li class="toctree-l4"><a class="reference internal" href="reference/namespace.html#id7">3.6. 内置成员名称空间</a></li>
<li class="toctree-l4"><a class="reference internal" href="reference/namespace.html#id8">3.7. 作用域声明</a><ul>
<li class="toctree-l5"><a class="reference internal" href="reference/namespace.html#global">3.7.1. global声明</a></li>
<li class="toctree-l5"><a class="reference internal" href="reference/namespace.html#nonlocal">3.7.2. nonlocal声明</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="reference/namespace.html#id9">3.8. 查看名称空间</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="reference/struct.html">4. 结构体</a><ul>
<li class="toctree-l4"><a class="reference internal" href="reference/struct.html#id2">4.1. 结构体</a><ul>
<li class="toctree-l5"><a class="reference internal" href="reference/struct.html#id3">4.1.1. 定义结构体</a></li>
<li class="toctree-l5"><a class="reference internal" href="reference/struct.html#id4">4.1.2. 结构体类型</a></li>
<li class="toctree-l5"><a class="reference internal" href="reference/struct.html#id5">4.1.3. 受保护成员</a></li>
<li class="toctree-l5"><a class="reference internal" href="reference/struct.html#id6">4.1.4. 私有成员</a></li>
<li class="toctree-l5"><a class="reference internal" href="reference/struct.html#id7">4.1.5. 绑定方法</a><ul>
<li class="toctree-l6"><a class="reference internal" href="reference/struct.html#id8">4.1.5.1. 方法的参数</a><ul>
<li class="toctree-l7"><a class="reference internal" href="reference/struct.html#id9">4.1.5.1.1. 命名建议</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l5"><a class="reference internal" href="reference/struct.html#id10">4.1.6. 实例化结构体</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="reference/struct.html#id11">4.2. 结构体对象</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="reference/input_print.html">5. 基本输入和输出</a><ul>
<li class="toctree-l4"><a class="reference internal" href="reference/input_print.html#print">5.1. print语句</a></li>
<li class="toctree-l4"><a class="reference internal" href="reference/input_print.html#input">5.2. input语句</a></li>
<li class="toctree-l4"><a class="reference internal" href="reference/input_print.html#id2">5.3. 题外话：更为灵活的输入输出</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="reference/lexical.html">6. 词法分析</a><ul>
<li class="toctree-l4"><a class="reference internal" href="reference/lexical.html#id2">6.1. 行</a><ul>
<li class="toctree-l5"><a class="reference internal" href="reference/lexical.html#id3">6.1.1. 逻辑行</a></li>
<li class="toctree-l5"><a class="reference internal" href="reference/lexical.html#id4">6.1.2. 物理行</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="reference/lexical.html#id5">6.2. 注释</a></li>
<li class="toctree-l4"><a class="reference internal" href="reference/lexical.html#id6">6.3. 行拼接</a><ul>
<li class="toctree-l5"><a class="reference internal" href="reference/lexical.html#id7">6.3.1. 显式行拼接</a></li>
<li class="toctree-l5"><a class="reference internal" href="reference/lexical.html#id8">6.3.2. 隐式行拼接</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="reference/basic_ctrl_flow.html">7. 基本控制流</a><ul>
<li class="toctree-l4"><a class="reference internal" href="reference/basic_ctrl_flow.html#if-elif-else">7.1. if-elif-else语句</a><ul>
<li class="toctree-l5"><a class="reference internal" href="reference/basic_ctrl_flow.html#id2">7.1.1. 格式要求</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="reference/basic_ctrl_flow.html#while">7.2. while语句</a><ul>
<li class="toctree-l5"><a class="reference internal" href="reference/basic_ctrl_flow.html#id3">7.2.1. 格式要求</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="reference/basic_ctrl_flow.html#for">7.3. for语句</a><ul>
<li class="toctree-l5"><a class="reference internal" href="reference/basic_ctrl_flow.html#id4">7.3.1. 格式要求</a></li>
</ul>
</li>
<li class="toctree-l4"><a class="reference internal" href="reference/basic_ctrl_flow.html#breakcontinue">7.4. break与continue</a></li>
<li class="toctree-l4"><a class="reference internal" href="reference/basic_ctrl_flow.html#try-catch-finally">7.5. try-catch-finally语句</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>


           </div>
           
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        
        &copy; 版权所有 2020, ChenHongbo

    </p>
  </div>
    
    
    
    Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
    
    <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
    
    provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  

  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>